Conversation
⚡ Required checks status: All passing 🟢Groups summary🟢 pytorch_lightning: Tests workflow
These checks are required after the changes to 🟢 pytorch_lightning: Azure GPU
These checks are required after the changes to 🟢 pytorch_lightning: Benchmarks
These checks are required after the changes to 🟢 fabric: Docs
These checks are required after the changes to 🟢 pytorch_lightning: Docs
These checks are required after the changes to 🟢 pytorch_lightning: Docker
These checks are required after the changes to 🟢 lightning_fabric: CPU workflow
These checks are required after the changes to 🟢 lightning_fabric: Azure GPU
These checks are required after the changes to 🟢 mypy
These checks are required after the changes to 🟢 install
These checks are required after the changes to Thank you for your contribution! 💜
|
There was a problem hiding this comment.
Pull Request Overview
This PR ensures compatibility with newer bitsandbytes releases by falling back to the new int8_double_quant API when double_quant is unavailable.
- Adds a feature check to call
double_quantfor older versions andint8_double_quantfor bitsandbytes ≥0.46 - Adjusts unpacking of returned values accordingly
Comments suppressed due to low confidence (1)
src/lightning/fabric/plugins/precision/bitsandbytes.py:262
- Add a unit test to cover the
int8_double_quantpath (bitsandbytes ≥0.46) to ensure this fallback remains functional across releases.
CB, SCB = bnb.functional.int8_double_quant(B)
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #20911 +/- ##
=======================================
Coverage 87% 87%
=======================================
Files 268 268
Lines 23442 23442
=======================================
Hits 20391 20391
Misses 3051 3051 |
bnb.functional.int8_double_quantbitsandbytes >=0.45.2,<0.47.0 & compatibility patch for bnb.functional.int8_double_quant
What does this PR do?
path for new release - update bitsandbytes requirement from <0.43,>=0.42 to >=0.42,<0.47
ref: https://dev.azure.com/Lightning-AI/lit%20Models/_build/results?buildId=235048&view=logs&jobId=80e425e9-2286-5482-2748-077465d0eec2&j=80e425e9-2286-5482-2748-077465d0eec2&t=c5f621af-a304-5088-cbea-3c82554e8451
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--20911.org.readthedocs.build/en/20911/
cc @justusschock @lantiga